package com.zy.cat.entity.game.resp;

import javax.persistence.Column;

import org.springframework.beans.BeanUtils;

import com.alibaba.fastjson.JSON;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.zy.cat.entity.game.CardDrawBannerConf;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 
 * @info 9趣猫刮刮卡banner条目实体类
 * @author Link
 * @date 2019-10-30 09:14
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("9趣猫刮刮卡banner条目实体类")
public class CardDrawBannerResp {
	
	@JsonIgnore
	@ApiModelProperty(value = "用户账号ID", example = "fe53d6a4fa29641")
	private String pid;
	
	@ApiModelProperty(value = "刮刮卡游戏条目key", example = "1001")
	private String code;
	
	@ApiModelProperty(value = "配置条目id", example = "110")
	@JsonIgnore
	private Integer cid;
	
	@ApiModelProperty(value = "奖励金额", example = "200")
	private String amount;
		
	@ApiModelProperty(value = "banner条目图片地址", example = "http://")
	private String entryIcon;
	
	@ApiModelProperty(value = "小图标图片地址", example = "http://")
	private String smallIcon;
	
	@Column(columnDefinition = "INT(5) DEFAULT '0' COMMENT '今日刮卡数'")
	@ApiModelProperty(value = "今日刮卡数", example = "1")
	private int gcards;
	
	@Column(columnDefinition = "INT(3) DEFAULT '0' COMMENT '今日剩余卡数'")
	@ApiModelProperty(value = "今日剩余卡数", example = "1")
	private long cards;
	
	@ApiModelProperty(value = "刮奖类型(1.1元、2.2元、3.5元、4.10元、5.20元、6.50元、7.80元、8.100元、9.200元、10.500元、11.1000元、12.1500元)", example = "1")
	private int gtype;
	
	@ApiModelProperty(value = "排序字段", example = "1")
	@JsonIgnore
	private int sort;
	
	@ApiModelProperty(value = "刮刮卡状态,0-不可挂，1可刮", example = "1")
	@JsonIgnore
	private int status;
	
	@ApiModelProperty(value = "创建时间", example = "2019-02-22")
	@JsonIgnore
	private String ctime;
	
	@ApiModelProperty(value = "最后更更新时间", example = "2019-02-22 10:10:10")
	@JsonIgnore
	private String ltime;
	
	public CardDrawBannerResp(String pid) {
		super();
		this.pid = pid;
	}

	public CardDrawBannerResp(String pid, String code, CardDrawBannerConf conf,String ctime,String ltime) {
		super();
		this.pid = pid;
		this.code = code;
		this.cid = conf.getId();
		this.amount = conf.getAmount();
		this.entryIcon = conf.getEntryIcon();
		this.smallIcon = conf.getSmallIcon();
		this.cards = conf.getCards();
		this.gtype = conf.getGtype();
		this.sort = conf.getSort();
		this.status = conf.getStatus();
		this.ctime = ctime;
		this.ltime = ltime;
	}

	public CardDrawBannerResp(String pid, int status) {
		super();
		this.pid = pid;
		this.status = status;
	}
}
